package com.itany.shop.service;

import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.ServiceException;
import com.itany.shop.exception.UserNotLoginException;
import com.itany.shop.vo.Cart;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/4/18 10:35
 * Version:1.0-SNAPSHOT
 * Description:
 */
public interface CartService {

    /**
     * 加入购物车
     * @param cart
     * @param productId
     */
    public void addCart(Cart cart,String productId) throws UserNotLoginException, RequestParameterErrorException, ServiceException;

    /**
     * 修改购物车明细数量
     * @param cart
     * @param productId
     * @param num
     */
    public void modifyCart(Cart cart,String productId,String num) throws UserNotLoginException, RequestParameterErrorException, ServiceException;

    /**
     * 删除购物车中指定明细信息
     * @param cart
     * @param productId
     */
    public void removeCart(Cart cart,String productId) throws UserNotLoginException, RequestParameterErrorException, ServiceException;
}
